/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package syntax;

import java.util.Comparator;

/**
 *
 * @author ennouaary
 */
public class DomainComparator implements Comparator<Domain>{

    @Override
    public int compare(Domain d1, Domain d2) {
        if (d1.getU_b()<d2.getL_b()) {
            return -1;
        }
        else if (d2.getU_b()<d1.getL_b()) {
            return 1;
        }
        else {
            return 0;
        }
    }
    
}
